#include <iostream>
#include <unistd.h>
#include <libmemcached/memcached.h>
#include <mysql.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include   <string.h>
using namespace std;


  struct passwdsend
{
	char pw_name[100];               // Username.
	char pw_passwd[2];              //Password.
	__uid_t pw_uid;              // User ID.
	__gid_t pw_gid;              // Group ID.
	char pw_gecos[100];              // Real name.
	char pw_dir[100];                // Home directory.
	char pw_shell[100];              // Shell program.
};

     struct RequInfo
      {
        char RequInfo[100];
        char Param[100];
        char Machname[100];
      };
     

struct spwdsend
{
    char sp_namp[100];         // Login name
	char sp_pwdp[100];         // Encrypted password
	long sp_lstchg;        // Date of last change
	long sp_min;          //  Min #days between changes
	long sp_max;          //  Max #days between changes
	long sp_warn;         //  #days before pwd expires to warn user to change it
	long sp_inact;        //  #days after pwd expires until account is disabled
	long sp_expire;        // #days since 1970-01-01 until account is disabled
	unsigned long sp_flag; // Reserved
};


/*get成功返回 1；失败返回0*/
int mr_memgetp(struct RequInfo Req,struct passwdsend *p);

void mr_memsetp(struct RequInfo Req ,struct passwdsend *p);

int mr_memgetsp(struct RequInfo Req,struct spwdsend *sp);

void mr_memsetsp(struct RequInfo Req ,struct spwdsend *sp);
